﻿package main { 
    import flash.display.MovieClip;
    import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.display.Graphics;
	import flash.text.TextField; 
	import main.*;
   
    dynamic public  class  butt extends  MovieClip {
		
	var num  : Number;	
	var power  : Number;
	var player  : Number;
	var col  : Number;
	var tex  : String;
	var txt  : TextField; 
	
	
		 
   public function butt()
		    { 
			trace ("Hello 2");
			 addEventListener(MouseEvent.MOUSE_DOWN, obrdown);
			 
	         addEventListener(MouseEvent.MOUSE_MOVE, mmove);
			     addEventListener(MouseEvent.MOUSE_OUT, mout);
			
			 graphics.lineStyle(1, 0x000000);
		     graphics.beginFill(0xCCCCCC);
		     graphics.drawRect(-50,-50,100,50);
		     graphics.beginFill(0xFF0000);
			
			}
	
	 
	 public function otm():void
	 {       
	         graphics.clear();
	         graphics.lineStyle(1,0x000000);
		     graphics.beginFill(col);
		 //    graphics.drawCircle( 0,0,20 );
			// trace("off "+num);
	 }
	 
	  public function ris():void
	 {       
	        // col=0xFFFFFF;
	         graphics.clear();
	         graphics.lineStyle(1,0x000000);
		     graphics.beginFill(col);
		//     graphics.drawCircle( 0,0,20 );
			// trace("off "+num);
	 }
	 
	 private function obrdown(evt:MouseEvent):void
	 { 
			trace(tex); 
	 }
	 private function mmove(evt:MouseEvent):void
	 { 
     	 graphics.lineStyle(1, 0x000000);
		 graphics.beginFill(0x999999);
		 graphics.drawRect(-50,-50,100,50);
		 graphics.beginFill(0xFF0000);
	 }
	 
	  private function mout(evt:MouseEvent):void
	  {
			 graphics.lineStyle(1, 0x000000);
		     graphics.beginFill(0xCCCCCC);
		     graphics.drawRect(-50,-50,100,50);
		     graphics.beginFill(0xFF0000);
			}
	 
}		
}